package com.olt.dao.oltTest;

import com.olt.domain.oltTest.UserScoreTotal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface IUserScoreTotal extends JpaRepository<UserScoreTotal,String> {

    UserScoreTotal getByTestIdAndUserId(String testId,Long userId);

    Boolean existsByTestId(String testId);

    int countByTestIdAndScoreTotalGreaterThanEqualAndScoreTotalLessThan(String testId, double min, double max);


    List<UserScoreTotal> findByTestIdOrderByScoreTotalDesc(String testId);
}
